package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TActivityUserMapper;
import com.ruoyi.system.domain.TActivityUser;
import com.ruoyi.system.service.ITActivityUserService;

/**
 * 活动人员Service业务层处理
 * 
 * @author yyh
 * @date 2024-06-24
 */
@Service
public class TActivityUserServiceImpl implements ITActivityUserService 
{
    @Autowired
    private TActivityUserMapper tActivityUserMapper;

    /**
     * 查询活动人员
     * 
     * @param id 活动人员主键
     * @return 活动人员
     */
    @Override
    public TActivityUser selectTActivityUserById(Long id)
    {
        return tActivityUserMapper.selectTActivityUserById(id);
    }

    /**
     * 查询活动人员列表
     * 
     * @param tActivityUser 活动人员
     * @return 活动人员
     */
    @Override
    public List<TActivityUser> selectTActivityUserList(TActivityUser tActivityUser)
    {
        return tActivityUserMapper.selectTActivityUserList(tActivityUser);
    }

    /**
     * 新增活动人员
     * 
     * @param tActivityUser 活动人员
     * @return 结果
     */
    @Override
    public int insertTActivityUser(TActivityUser tActivityUser)
    {
        tActivityUser.setCreateTime(DateUtils.getNowDate());
        return tActivityUserMapper.insertTActivityUser(tActivityUser);
    }

    /**
     * 修改活动人员
     * 
     * @param tActivityUser 活动人员
     * @return 结果
     */
    @Override
    public int updateTActivityUser(TActivityUser tActivityUser)
    {
        tActivityUser.setUpdateTime(DateUtils.getNowDate());
        return tActivityUserMapper.updateTActivityUser(tActivityUser);
    }

    /**
     * 批量删除活动人员
     * 
     * @param ids 需要删除的活动人员主键
     * @return 结果
     */
    @Override
    public int deleteTActivityUserByIds(Long[] ids)
    {
        return tActivityUserMapper.deleteTActivityUserByIds(ids);
    }

    /**
     * 删除活动人员信息
     * 
     * @param id 活动人员主键
     * @return 结果
     */
    @Override
    public int deleteTActivityUserById(Long id)
    {
        return tActivityUserMapper.deleteTActivityUserById(id);
    }
}
